<template>
  <div>
    <FreeForm :query-config="queryConfig"></FreeForm>
  </div>
</template>

<script setup lang="ts" name="bill-settlement-not">
import { reactive } from "vue";

const queryConfig = reactive([
  {
    label: "文本",
    prop: "inp",
    queryType: "input",
    defaultValue: "123",
  },
  {
    label: "计数器",
    prop: "inpNum",
    queryType: "inputNumber",
    defaultValue: 123,
  },
  {
    label: "选择框",
    prop: "sel",
    queryType: "select",
    options: [
      { label: "选项1", value: "1" },
      { label: "选项2", value: "2" },
    ],
    multiple: true,
    defaultValue: ["1"],
  },
  // {
  //   label: "日期",
  //   prop: "date",
  //   queryType: "date",
  //   defaultValue: '2021-10-29'
  //   // disabledDate: (time: Date) => {
  //   //   return time.getTime() > Date.now()
  //   // }
  // },
  // {
  //   label: "日期范围",
  //   prop: "daterange",
  //   queryType: "daterange",
  //   defaultValue: ['2023-09-01', '2023-09-05'],
  //   // disabledDate: (time: Date) => {
  //   //   return time.getTime() > Date.now()
  //   // }
  // },
  // {
  //   label: "日期时间",
  //   prop: "datetime",
  //   queryType: "datetime",
  //   defaultValue: '2023-09-01 00:00:12',
  //   // disabledDate: (time: Date) => {
  //   //   return time.getTime() > Date.now()
  //   // }
  // },
  {
    label: "日期时间范围",
    prop: "datetimerange",
    queryType: "datetimerange",
    defaultValue: ["2023-09-01 00:00:12", "2023-09-06 12:12:12"],
    disabledDate: (time: Date) => {
      return time.getTime() > Date.now();
    },
    labelWidth: "130px",
  },
]);
</script>

<style scoped></style>
<route lang="yaml">
meta:
  parent: "商品中心"
  title: "测试"
  index: 1
</route>
